package com.cmc.cloud.cmclink.doc.api.document.rep;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 提单箱况备案 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BlnoCntrRecordationBaseDto {

    @Schema(description = "提单号")
    @Length(max = 50, message = "{blnocntrrecordation.blno.length}")
    private String blno;

    @Schema(description = "订舱号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{blnocntrrecordation.bookingNo.notblank}")
    @Length(max = 20, message = "{blnocntrrecordation.bookingNo.length}")
    private String bookingNo;

    @Schema(description = "箱号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{blnocntrrecordation.cntrno.notblank}")
    @Length(max = 12, message = "{blnocntrrecordation.cntrno.length}")
    private String cntrNo;

    @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
    @NotBlank(message = "{blnocntrrecordation.remark.notblank}")
    @Length(max = 200, message = "{blnocntrrecordation.remark.length}")
    private String remark;

    @Schema(description = "文件名", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @NotBlank(message = "{blnocntrrecordation.filename.notblank}")
    @Length(max = 200, message = "{blnocntrrecordation.filename.length}")
    private String fileName;

    @Schema(description = "文件大小", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{blnocntrrecordation.filesize.notnull}")
    private Integer fileSize;

    @Schema(description = "文件资源id", requiredMode = Schema.RequiredMode.REQUIRED, example = "32690")
    @NotNull(message = "{blnocntrrecordation.fileid.notnull}")
    private Long fileId;

    @Schema(description = "文件格式", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{blnocntrrecordation.fileFormat.notnull}")
    private String fileFormat;
}
